﻿using Produce.Domain.Entities;
using SqlSugar;
using System.Collections.Generic;

namespace Produce.Infrastructure.Repositories
{
    public interface IProduceModelRepository<T> where T : BaseEntity
    {
        /// <summary>
        /// һµʵ
        /// </summary>
        /// <param name="model">Ҫʵ</param>
        /// <returns>Ӱ</returns>
        int Create(T model);

        /// <summary>
        /// һѴڵʵ
        /// </summary>
        /// <param name="model">Ҫµʵ</param>
        /// <returns>Ӱ0 ʾδҵӦ¼</returns>
        int Update(T model);



        /// <summary>
        ///  ID ȡʵ
        /// </summary>
        /// <param name="id">ʵΨһʶ</param>
        /// <returns>ƥʵ򷵻 null</returns>
        T  GetModel(long id);

        /// <summary>
        /// ȡݵֻϣִУ
        /// </summary>
        /// <returns>ݵļ</returns>
        ISugarQueryable<T> GetValue();
    }
} 